<template>
    <div>
        <wait v-if="state==0"></wait>
        <unpass v-if="state==2"></unpass>
        <pass v-if="state==1"></pass>
        <close v-if="state==3"></close>
        <store-application v-if="state==999"></store-application>
    </div>
</template>

<script>
import { getadminPos } from '@/api/pos.js';

import wait from './wait.vue';
import unpass from './unpass.vue';
import pass from './pass.vue';
import close from './close.vue';
import StoreApplication from './StoreApplication.vue';
export default {
    data() {
        return {
            state: ''
        };
    },
    components: {
        wait,
        unpass,
        pass,
        close,
        StoreApplication
    },
    created() {
        getadminPos({ adminName: localStorage.getItem('ms_adminName') }).then(res => {
            if (res[0].outletId) {
                let { state } = res[0].outletId;
                this.state = state;
            }else{
                this.state=999;
            }
        });
    },
    methods: {}
};
</script>

<style>
</style>